package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLIVirtualInputer;
import HLLib.base.HLList;
import HLLib.base.HLVirtualPad;

public class HLClassVirtualPad extends HLLibClass {
    public HLClassVirtualPad(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HLVirtualPad();
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            HLVirtualPad.Start();
            break;
        }
        case 1: {
            HLVirtualPad.Stop();
            break;
        }
        case 2: {
            HLVirtualPad.pointerRefresh((HLList)args.GetObject(0));
            break;
        }
        case 3: {
            HLVirtualPad.update();
            break;
        }
        case 4: {
            HLVirtualPad.Add((HLIVirtualInputer)args.GetObject(0));
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                HLVirtualPad.Count();
            } else {
                resultOwnerObject.SetInt(resultIndex, HLVirtualPad.Count());
            }
            break;
        }
        case 6: {
            if (resultOwnerObject == null) {
                HLVirtualPad.GetItem(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLVirtualPad.GetItem(args.GetInt(0)));
            }
            break;
        }
        case 7: {
            if (resultOwnerObject == null) {
                HLVirtualPad.GetItemByID(args.GetInt(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, HLVirtualPad.GetItemByID(args.GetInt(0)));
            }
            break;
        }
        case 8: {
            HLVirtualPad.RemoveItemAt(args.GetInt(0));
            break;
        }
        case 9: {
            HLVirtualPad.RemoveItemByID(args.GetInt(0));
            break;
        }
        case 10: {
            HLVirtualPad.Clear();
            break;
        }
        }
    }
}
